package akbderby.service;

import java.util.List;

import org.slim3.datastore.Datastore;

import akbderby.meta.UserDataMeta;
import akbderby.model.UserData;

public class UserDataService extends ServiceBase {

    private UserDataMeta t = new UserDataMeta();

    public UserData getUser(String userId) {
        List<UserData> l =
            Datastore.query(t).filter(t.userId.equal(userId)).asList();
        return isEmpty(l) ? null : l.get(0);
    }
}
